import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
import layout from '../components/layout'
import home from '../components/home'
import search from '../components/search'
import play from '../components/play'
import comment from '../components/comment'
const routes = [
    {
        path: "/",
        redirect: "/layout"
    },
    {
        path: "/layout",
        redirect: "/layout/home",
        component: layout,
        children: [
            {
                path: "home",
                component: home,
                meta: {
                    title: "首页"
                }
            },
            {
                path: "search",
                component: search,
                meta: {
                    title: "搜索"
                }
            }
        ]
    },
    {
        path:"/play",
        component:play
    },
    {
        path:"/comment",
        component:comment
    }
]
const router = new VueRouter({
    routes
})
export default router